{% extends "sniffbook/base.html" %}
{% block content %}

<font size=+2>
<a href="/material/{{mat.id}}/">{{ mat.name }}</a> - Rendered.
</font>
<p/>

<form action="/render/{{mat.id}}/" method="POST">
{% csrf_token %}
{{ render_form }}
<input type="submit" value="Rescale">
</form>
<p/>

Total amount: {{ renderer.total_amount }} <br>
Total price: {{ renderer.total_price }} <br>

Filler: {{renderer.filler }}
<p/>

<table>
<tr>
<td><a href="/render/{{mat.id}}/s=n">Name</a></td>
<td><a href="/render/{{mat.id}}/">Amount</a></td>
<td><a href="/render/{{mat.id}}/s=p">Price</a></td>
<td><a href="/render/{{mat.id}}/s=b">Bottle</a></td>
</tr>
{% for comp in renderer.rendered_components %}
<tr>
<td><a href="/material/{{comp.material.id}}/">{{ comp.name }}</a></td>
<td>{{ comp.formatted_amount }} </td>
<td>{{ comp.formatted_price }} </td>
<td>{{ comp.bottle_num }}</td>
</tr>
{% endfor %}
</table>

</p>
{% endblock %}

